%%This is a very basic article template.
%%There is just one section and two subsections.
\documentclass[11pt,oneside,a4paper]{article}
\usepackage{graphicx} 
\usepackage{cite}
\usepackage{pdfpages}
\usepackage{listings}
\usepackage{color}

\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}

\lstset{frame=tb,
  language=Java,
  aboveskip=2mm,
  belowskip=2mm,
  showstringspaces=false,
  columns=flexible,
  basicstyle={\small\ttfamily},
  numbers=none,
  numberstyle=\tiny\color{gray},
  keywordstyle=\color{blue},
  commentstyle=\color{dkgreen},
  stringstyle=\color{mauve},
  breaklines=true,
  breakatwhitespace=true
  tabsize=3
}

\title{Recent Advances in Web Technology}
\author{Adiljan Abdurihim and Olav Brenna Hansen}

\begin{document}
\maketitle

\section{Introduction}\label{s:intro}
This project will describe a system proof of concept for the purposes described in
the scenario , involving recent advances
in web technology. These recent advances and the latest technological development makes more convenient for developers 
to implemented them for a various of mobile devices and browsers. Solutions like e.g. PhoneGap can decrease the amount of work
done when developing an application. PhoneGap is known as across platform framework and
uses already known (native) HTML, CSS and JavaScript technology to create unified code for different
platforms. Of course it has some weaknesses, but the progress and future
development is positive. See section \ref{s:platform} 

Different standards and technological solutions are
emerging as we speak. Some solutions used in this project are still drafts of
the w3c, some more complete than others. Therefore, some implementations for the
same solution can be various. The chosen solutions and decisions will be explained and discussion
regarding their pros and cons and other possible solutions for the same problem
will be presented. The whole process for this project will be the development and testing of
different new technologies in a real world situation, defining platform compatibility,
frameworks, patterns etc. and discussing their strengths and weaknesses rather than
suggesting a perfect solution. See \ref{ap:a}

\section{Project Design}\label{s:projectdesign}
% What is it? What are you using it for? Future/Todays position?
The application will be built on following functionalities that will provide file-transfer, local and external storage, synchronisation of files, geolocation, authorisation and client-server communication. The application should also work in offline mode. The application will be designed according to the provided logical design (see figure \ref{fig:NET}) referencing to the project description. See \ref{ap:a}

The chosen technologies such like PhoneGap framework, SOAP, DropBox API, indexedDB, and etc used in the development is highly relevant and actual nowadays. These technological solutions are promising and expected to be widely used in the future. Therefore, use of these technologies are relevant for today and for future development. Beside this, the application uses design patterns including software architecture pattern MVC and Mashups for better structure and efficiency. Different patterns and technology will be discussed more thoroughly in the section \ref{s:implementation}.

\subsection{UML}\label{s:uml}

\begin{figure}[htb]
\centering
\includegraphics[width=1\textwidth]{UML.png}
\caption{The figure represents UML Diagram of files those have interaction with each other} \label{fig:uml}
\end{figure} 

The figure above represents general view and interaction of Native and PhoneGap cross platform framework files. The package, no.project.nature, on the left side is Java classes. Nature.java file is an activity that launch android application and with the help of loadUrl method navigates to index.html file in assets folder in the PhoneGap part. With the help of imported libraries e.g. (cordova, jquery, dropbox) it is possible to make Native like application using HTML5, CSS3 and Javascript. The various API used in PhoneGap let developers easily create difficult functionalities in more familiar programming language. The three files on the right side are index.htm, server.js and I18N.js. All pages and library references declared in index.html file. Server.js is responsible for the execution of some functionalities like synchronization, sending data to the server etc through functions. Here it should be mentioned that synchronization method located in Server.js file initiate Sync.java file through use of plugin. The DropBox.java file is responsible for the synchronization, as it mentioned before the initiation of this class occurs through Sync.java plugin file that can be called with simple javascript method in Server.js file. See the code in \ref{ap:b}. 

The I18N.js is responsible for the internationalization. The structure was built according MVC software architecture pattern to provide easiness in reusability. 

The UML diagram represents only general overview of all files involved in the development of application whereas libraries and other minor files were not included into diagram. 

\begin{figure}[htb]
\centering
\includegraphics[width=0.9\textwidth]{NET.png}
\caption{This is representation of network architecture among different devices in the interaction system.} \label{fig:NET}
\end{figure} 

The diagram above (see figure \ref{fig:NET}) represents the communication of the different nodes in the system. It is observable that both mobile users and PC users are able to communicate with each other. Each node has possibility to upload file or communicate with external server and cloud service through internet. Authentication process will be required for the use of cloud service, in this case the key and password for the DropBox cloud service will be used for the authorization. The connection to the external server will be through HTTP(S) request API. See section \ref{s:dataupload}.


\subsection{Prototype}\label{s:prototype}

The figure \ref{fig:mob} is an early hi-fi prototype designed by the team for the navigation of getting sense of first step design. This prototype illustrates possible design of user interface. Such kind of early mockups help developers visualize the application and make tests on functionality through scenario play. Although, the design provides all defined requirements, still it can be awaited some changes in graphical user interface of final product. 

\begin{figure}[htb]
\includegraphics[width=0.5\textwidth]{mob.png}
\caption{The figure represents hi-fi prototype of application} \label{fig:mob}
\end{figure} 

\section{GUI} \label{s:gui}
The application does not require advanced or special design of user interface. The GUI will be designed according to the hi-fi prototype presented in section \ref{s:prototype}. Therefore jQTouch library is used for the easier creation of the Graphical User Interface (GUI) that feels like native application. 
The jQtouch is a jQuery plugin with native animations, navigations and themes. The integration of the library is easy that needs just reference to the library and css files. The library includes three templates to choose from with a possibility to create own theme if necessary. The application is using the vanilla.css as a theme. The known HTML, CSS and Javascript gives developers flexibility in the future redesign of GUI. Although there is a possibility of designing own GUI with CSS still it is time demanding. For those who want more advanced GUI with extra functionalities the jQuery, Sencha Touch can be an alternative. 
The jQtouch uses mini version of jQuery library called Zepto.

\section{Implementation}\label{s:implementation}
% Discussion of strengths and weaknesses. Why we chose the specific technology?
% Alternatives? Strengths? Weaknesses? Difficulties encountered implementing it.
This section will discuss technology used in the application including their
strengths and weaknesses. The section will look into possible alternatives and
difficulties encountered at the process of implementation.

\subsection{Native apps vs html5 web apps}
There are big discussion around the preferred approach when developing mobile applications. The native application is engineered and downloaded to an specific device whereas the web application use the browser to access internet. 
There is however an issue when it comes to compatibility across browsers for html5. Although html5 has the backing of Microsoft, Mozilla, Opera, and even Apple and Google, older browsers don't support all functionality that html5 provides. One might think that it's just to update ones browser, but the truth is that the majority of browsers are old versions and users seldom do or understand why they should do a update. New technology in HTML5 are eg canvas for graphics and drawing, support for video and audio, support for mobile devices, local storage of applications and data and finally data transfer with Web Sockets. 

When it comes to video, Flash video is hardly supported for mobile devices whereas html5 is supported for iOS, Opera and Android. IE 6,7 and 8 don't support html5 but IE 9 and 10, Chrome and Firefox do. The main formats for video and audio are: MP4, WebM for video and AAC, MP3 and Vorbis for sound. Browsers differ in their support for MP4 and WebM. The \textless source\textgreater  tag in html5 supports loading of both formats in one go\cite{lawson2011introducing}. 

Html5 and CSS3 follows a open standard and the trend is going from proprietary to the open approach. Java applets have shown major security problems (bankId) the last couple of years and we actually see html5 pages taking over \cite{BankId}. Silverlight is also a descending technology. Html5 provides a better platform independence and we see video providers like Netflix eager to leave the Silverlight and native app to use W3C standards \cite{Netflix}.
\\
There are som clear advantages with web applications:
\begin{itemize}
\renewcommand{\labelitemi}{$\bullet$}
\item Developing an HTML5 app takes roughly half or less of the time compared to developing a native app.
\item Content and layouts can be changed instantly.
\item  HTML5 apps can be distributed regularly via an App Store or can be made available via the browser. 
\end{itemize} 

And some disadvantages:
\begin{itemize}
\renewcommand{\labelitemi}{$\bullet$}
\item The HTML5 standard is still being developed and the final version is still a couple of years away. 
\item HTML runs slower than applications developed using native code.

\end{itemize} 

 In this specific project however, we do assume browsers and technology to be up to date and the appropriate desktop and mobile devices are calibrated to work within the given framework. Chrome is chosen as web browser and on mobile, the Android OS.  

With marketers increasingly adopting HTML5-formatted ads to address the cross-screen habits of consumers
consumers are increasingly engaging with digital content on desktop, laptop and mobile devices, driving the need for ads to perform seamlessly across platforms.

While the web browser’s local databases make it easier for web apps to cache data, they won’t provide the same data power found with desktop apps.

\begin{figure}[htb]
\center
\includegraphics[width=0.3\textwidth]{browserusage.png}
\caption{Web browser usage on Wikimedia September 2012 \cite{wikimedia}. } \label{fig:usage}
\end{figure} 


\subsection{HTML}\label{s:html}
Comparing offline web application to phonegap there are some reasons when you prefer one to another. Offline web application can be easy to create, light in size as it contains list of references, called cache manifest file, which contains URLs to download. Files are located in server and cached locally as application goes online. All cached files enables application to be used offline. This kind of application preferable for little interaction with the network and little demand for size. In this project the team decided to use the phonegap in the development process to avoid rapid downloads from server. The requirements for the project states that there will be need for the upload and download of data to the server and from. The display of images and text on map requires network. Additionally, caching huge amount of files will only duplicate same files locally and on the server. Beside to this there is a need of connection in order to be updated of recent changes done by other users. These aspects are overtaking factors for the decision to use phonegap that enables work both with HTML and Native language. \ref{s:phonegap} There is of course another possible reason for not choosing offline web application. It can limit the users if they have older browser version. \ref{fig:versionsBrowser}


\subsection{Platform}\label{s:platform}

PhoneGap is an open source framework for building cross-platform native applications using standard web technology such as HTML, CSS and JavaScript a so called hybrid application supported by Apple IOS, Google Android, HP/Palm webOS and Microsoft Windows Phone 7\cite{PGap}. The cross-platform approach suites PhoneGap with a huge advantage for developers wanting to deploy their mobile application on diverse platforms and their respective application stores.  A huge advantage with PhoneGap API, is the access to device-side features (eg camera and geolocation) and the good environment for building quick prototypes of a mobile application. The application starts up with index.html and turns over the control to the web view which in turn interacts with the user and the underlying web application and its content, links or JavaScript code. The application will respond like an application running in a web browser. The PhoneGap coding structure needs to be changed for the different platforms. There is a cloud based service to ease this transition, PhoneGab build. 

There are some disadvantages with PhoneGap. It can be stated that it is not really a framework.  It�s really nothing more than a wrapper around a local HTML page with an extra JS library to access native features like the camera, local storage, etc. PhoneGap is not properly set up for MVC. Its seems good for static native apps but lacking some functionality for adding  any dynamics. It need some kind of JS MVC to tie it all together. More about MVC implementation read in section \ref{s:mvc}.

Though the PhoneGap is easy to work with and deploy still PhoneGap has limitations in use of some native functions like services. Although that can be accessed through plug-in. In the application we had to reference DropBox API developed for Native Android through own defined plugin. See section \ref{s:projectdesign}. Still despite some weaknesses, PhoneGap can provide possible solutions through different ways, mainly by making plug-ins etc. Making it a framework best suited for fast development / prototyping of applications for several platforms. 

\subsection{Offline web application}\label{s:offline}
The application is best suited for online usage. Although in some situations there might be loss of wifi, 3g, edge or other mobile connections forcing the user to work in an offline solution. HTML5 introduces local storage and app caching that can provide possibility of working offline, see section \ref{s:data upload}.

The cache manifest file tells the browser what files to load and save, that enables use of application in offline mode. As long as the app is online, it will check the cache manifest file with the server. When the manifest file changes, the application will try to download the rendered content listed for download in the manifest file and update the file cache (see figure \ref{fig:petri}). The example of manifest file below has three main attributes. Where CACHE is responsible for downloading declared files from the server and save it in the cache. The NETWORK attribute checks network connection before downloading declared file(s). NETWORK resources will always skip caching. If a download fails, the FALLBACK steps in to supply an alternative cached resources.
\begin{lstlisting} 

CACHE MANIFEST
# v1
CACHE:
/map/mobile/examples/template.aspx
/map/mobile/examples/template.css
/map/mobile/examples/template.js

NETWORK:
http://maps.gstatic.com/
http://maps.google.com/
http://maps.googleapis.com/
http://mt0.googleapis.com/
http://mt1.googleapis.com/
http://mt2.googleapis.com/
http://mt3.googleapis.com/
http://khm0.googleapis.com/
http://khm1.googleapis.com/
http://cbk0.googleapis.com/
http://cbk1.googleapis.com/
http://www.google-analytics.com/
http://gg.google.com/

FALLBACK:
/offline.html

\end{lstlisting} 

The same idea can be used to download media files from server putting them into cache manifest file. That can be useful, but at the same time a huge number of images will fill out the dedicated cache storage. Therefore, the team has decided to show media files when online. 
A version number can be commented in the manifest. The downside will be for the developer to remember to update the version number each time a file is changed. 

\begin{figure}[htb]
\includegraphics[width=1\textwidth]{petri.png}
\caption{The figure represents petri net diagram for the cache manifest file} \label{fig:petri}
\end{figure} 

An alternative solution to automate this procedure using a script to update the 
manifest file each time a file is changed\cite{Ph5a}. The script will loop through all the files in 
the manifest and do a MD5 checksum on each one and add a final checksum into the manifest file. 
The script should be run in the development environment to avoid a never ending loop on the server.

So why do we want to use the offline manifest? There are three specific reasons for using the manifest. One is for cold-start offline and thereby enhancing usage of an web application to offline usage by caching the necessary resources on the browser. Secondly the cached files reduces the start up time. And thirdly for background updates from the server. The cache is limited to 5 MB and significantly reduces the possibility to download loads of images or text. The app cache is not supported by Internet Explorer or Opera. It's important to know that, when using a cache manifest, even if files are changed on the server, the browser will continue to use the cached files until the cache manifest file itself is changed. ManifestR\cite{ManR} is a grat tool for making a manifest file by visiting your page with the browser and using ManifestR to generate the files needed to run the page. In this project we used PhoneGap to develop a native mobile application by "wrapping" the files needed to run the application and install it on the device. The need for caching is thereby reduced to external files that are important when e.g. having to refer to guidelines and laws that can change continually. For native web applications running on a desktop or laptop browser, the cache manifest can be a great tool and enhances all the possibilities mentioned. Although offline usage might not be a issue when working from a office, the cache increases application speed and update solutions.  

Offline storage significantly increases the usability for offline mobile applications. When the supervisor writes drafted rapport or takes pictures when being in the wilderness, chances for an online connection might be small. Pictures, video and text can be put into the local storage and when the device gets online, saved tasks can be issued. The offline storage can be used with Web Storage API, IndexedDB API or Web SQL Database API (also called local storage). There is no standard and the choice depends on what browser you develop for. Web Storage is supported by all browsers except opera mini, IndexedDB is a draft for the W3C and currently only supported by Firefox 19, Internet Explorer 10 and and Chrome 2, and Web Sql is supported by all except Internet Explorer Opera Mini and Firefox browsers5 \cite{CanUse}. You may have to support older browsers for a wide public usage and thereby use several storage solutions. Web storage might seem like the obvious choice as it's supported by most browsers. For simple tasks this is true, but when you need structured data and ensure integrity and accuracy from queries, Web Sql and IndexDB would be a better choice \cite{OfflineRocks} although Web Sql would bring more complexity into the application. Filetransfer Api is another solution and supports great amount of data using the local file system, extending the 5MB limit for local storage. See discussion in section \ref{s:filetransfer}. It's importante to mention that a promition to extend the 5MB limit set by the browser is possible.  

The cache manifest file above is an example of caching parts of the google map for usage when offline. A further more extension would be to choose the area of interest from the application, download it to the cache before going to an area known to be without coverage. 

For this project there is not a great need to use the cache manifest file as all files usually on a web server is packaged into the mobile application. The web application will be used in a work place and assumed to have stable online connection to a web server. 


When talking about storage and mobile devices we have to look at the huge possibilityto store user data from the varaiety of enhancements on the mobile device. This gives loads of possibilities for scientific research, advertisers and developers. But one should remember to act responsably and acording to privacy (see discussion in section \ref{s:privacy}).

\subsection{Data Upload}\label{s:dataupload}
This section will briefly go through possible alternatives of file transfer that
has been used in the application. Additionally, the section describes some
difficulties encountered at the implementation process.
Two solutions are tested. One using the cache manifest file and one using the dropbox api. Both can be used for uploading and synchronisation purpose. These solutions work well, although dropbox have more advanced functions. The main issue can be the privacy regulations when using cloud services. See discussion in section \ref{s:privacy}.  

\subsubsection{FileTransfer}\label{s:filetransfer}

The FileTransfer API available on PhoneGap let easily transfer files to the server through HTTP(S) protocol. The uploading of files occur after checking the network connection. In this case the wifi connection is desired in order to avoid data traffic charge. If connection is available the selected files will be uploaded on server. The temporary file with the URI of files for upload is used to transfer files to the dedicated server. The implementation was easy, but was failing due to the restrictions set by the University security regulations on student dedicated server. The problem had been solved by setting permissions on folder to 777. This kind of restrictions and network break can cause fail in uploading, therefore URI of selected files for the upload is saved locally using local storage for later re-upload. \ref{s:localstorage} This will secure loss of files. Still the implementation is insufficient due to connection quality and image size that can cause longer transfer time to send files. As the team thinks that the physical presens of files is important to store in server for easier further use this way has been used. There is a weakness in chosen solution compared sending file via use of URI, which is faster.  

\subsubsection{Local Storage}\label{s:localstorage}
The local storage is mainly used in saving file names that will be sent to the server if there is no wifi connection. Local storage is very powerful solution for the easy access of data. The local storage is freed when files are uploaded to the server. Local storage is used to keep somehow versioning of files for the synchronisation as an alternate to the DropBox \ref{s:dropbox}

\subsubsection{DropBox}\label{s:dropbox}
The DropBox API has been used for the synchronisation purpose in the
application. The application encountered some issues due to the use of PhoneGap
cross platform framework that has limitation to use some codes written for
Android Native. Therefore, the integration was done through self written plugin for the
synchronisation of data. The application was failing due to some errors in the library. Finally,
it has been discovered that application needed change in SDK version. SDK
version should be set at least to 10 as a minimum. The changes both in
project.properties and AndroidManifest.xml files have been done that resolved the problem. This
implementation is an alternative for the presented functionality, FileTransfer
API, in PhoneGap, see section \ref{s:filetransfer}. The advantage of DropBox compared to FileTransfer API is its compensation of lack of storage space with simplicity and inarguable its popularity. It includes automatic backup, file sharing and file versioning. 
Although Dropbox has exceptional security, using the latest SSL- encryption technology, combining it with additional encryption before uploading files is preferable.  

Wuala is another synchronization service that focuses more on privacy than many other synchronization services. It ensures that all data is encrypted on the client side and is great as a backup tool. SugarSync is yet another service that lets you add password protection to your files. Wuala don't have a public API, as does SugarSync and Dropbox, making it unsuitable to use for developers. Dropbox still seams to be the best tool for synchronization as it is so compatible across platforms. Most services offer a server side solution for synchronization although some e.g.. offer a client side sync. The downside will be if the client synchronization device loose its internet connection. 

\subsection{Geolocation}\label{s:geolocation}
The geolocation implementation done on the server side. There is a web page with the list of all files sent to the server with the ability of detailed view. The files can be viewed in a map as a marker. Here it should be admitted that files uploaded with the identical geo location will be difficult to view as it overlays the previous one. Therefore, the list of available images placed on the left sidebar to the map. This will at least secure the display of all images. As a future development this can be altered in a better way, providing better solution. The view of files on the map using mobile will be performed through redirection to the URL.

\subsection{Geolocation and Google Maps}\label{s:geolocation}
A mashup pattern is used to gather the different geolocations from the synchronized data and displaying them in the Google Map layer \cite{Pattern}. The data is collected from the server, with PhoneGap File transferAPI, to apply the data from all users. Google Map Api is the underlaying service and has to be taken into consideration as certain copyright privileges can become a issue.  


\subsection{MVC}\label{s:mvc}
With a system designed in MVC, integration to new technologies, systems, and overall application flexibility become much easier. If A new data architecture is to be implemented, all that needs changed is the model layer. 
If the systems change to have the presentation layer on a separate set of servers, the views and their access are the only things affected. If a new technology is to be leveraged for a module of the system, that component only needs to be changed to point to the new component.



\subsection{SOA}\label{s:soa}
Service-Oriented Architecture is an approach for designing systems that allow for continuous change through loosely-coupled, composite, and contracted Services. This is not a software architecture, but rather an overarching enterprise architecture that aims to create a level of abstraction for decomposing business process into finer grained Services.

With SOA, the users table can be abstracted out of the core of the application and placed in its own area. The functions that were achieved within the model will now be called as a service. 


This service can allow for much better component creation, and allows for ease of great things like single sign on and data syncing. The create, authenticate, getData and other functions are organized into generic services. 

These generic services ease the creation of new applications having either the same or new member accounts, but using the same functions. This also allows for application specific functions to be maintained within the application and not affect the core services: login, logout, preference, sessions, cookies, etc.

\subsubsection{MVC and SOA}\label{s:mvcsoa}

Model-View-Controller (MVC) IS a software architecture pattern. Many of the ideas of MVC very closely parallel the ideas of SOA, especially the notion of the SOA metamodel, which separates Service design into three aspects: the business model, Service model, and Implementation models. The MVC approach separates application design into the Model (domain-specific representation), View (rendering of model for interaction), and Controller (event and action handling between View and Model).  

With MVC, one model (or a linking of multiple models) would control the user functions, such as login, logout, etc. Each of these functions would be executed within a controller and its functions. Each application, or instance of the application has to either maintain its own user tables or share database connections. This is not necessarily a bad approach, and MVC design definitely helps to modularize these functions. However, adding SOA to an MVC design for this simple application function has many benefits.

\section{Authentication}\label{s:authentication}
The authentication for enabling authorisation for your data is very sensitive case where users are very sensitive. There are about more than 35 Google APIs for the use of OAuth authorisation. OAuth is one of this API that enables to use your account on google, twitter or Facebook to authenticate user for access of data. 
Locating the password and user names in one place can cause problem for remembering different passwords. The authorisation is granted by the access token.  

Beside the popularity of OAuth and support from Google. The OAuth comparing to the OpenID is more easier to implement ...little bit more discussion. Therefore the team has made decision to implement OAuth for login. 

\subsection{OAuth 2.0}
The OAuth implementation became little bit difficult due to novelty and complicated structure of the documentation. The PhoneGap framework used in the development requires OAuth written in JavaScript or Java as a plug-in. The written code in javascript is still novel and the privacy issues can be a concern even though no such cases have been reported. %\cite{} %cite page where it talks about privacy concern.

The implementation of the OAuth in Phonegap requires plug-in ChildBrowser to solve issue on redirection of URL. 

\section{Restriction}\label{s:restriction}
Restrictions regarding screen size on mobile device. One solution is to show the map in full screen size by removing application title bar.   The number of markers, representing tasks on the map, has to be limited in number. This is achived by...  
In the markers info window a uri or url link to the resource is displayed. Uri`s are faster to download but not well supported by the different browsers.

\section{Limitation}\label{s:limitation}  

\section{Privacy}\label{s:privacy}
The Privacy concern for the application developed varies and depends according to those country's policy in where it is launched. 
According to the privacy policy for the official sector in Norway, it is clearly stated that any sensitive information must be secured and located inland. Therefore, the cloud service functionality used for the application can be restricted due to its location, as dropbox servers are US based. Taking in consideration the privacy policy, the application implemented file storage on a dedicated server using FileTransfer API. It is described in section \ref{s:dataupload}. 

\section{The semantic web}\label{s:Onthology}
In the paper "Advancing ecological research with ontologies"  \cite{EcoOnt}
 Effectively locating information that is directly
relevant to a study, and then integrating it for analysis,
requires seamless access to datasets and improved mechanisms for describing their information content.
Ontologies provide a formal representation of the terminology and concepts in a scientiﬁc domain, which can be
used to clarify the relationships among those terms and concepts  \cite{EcoOnt}. The ontology can make a 
formal representations of the knowledge in a domain of discourse.  Ontologies hold great promise as a unifying mechanism for representing knowledge because they are interpretable by both humans and computer applications, and subsequently facilitate the use of automated reasoning for helping with arduous data management
tasks that scientists deal with on a daily basis. 


\subsection{Domain-specific Ontologies}
Focus on capturing terminology used in specialized scientiﬁc disciplines or communities. Gives a more detailed description whitin the domain and more accurate results for researchers and / or automated analytic tools. By domain- specific ontologies in the project prototype, one can add facet and phenomena ontologies and better understand why the tree line is going higher, some spices are disappearing or the impact of different natural disasters.


\subsection{Framework Ontology}
Framework ontologies are designed to interconnect existing domain-speciﬁc ontologies while providing a consistent
foundation for future ontology-building efforts  \cite{EcoOnt}. Framework ontology focus on observations and measurements and datasets are viewed as collections of observations that
provide information about the entity observed, the measurement taken of the entity (e.g. its weight in kilo-
grams) and the context of the observation (e.g. when and where the observation was taken, who took the observation, and so on). The prototype would clearly benefit from implementing an framework ontology. The  data would be better characterized on where it was gathered and who gathered it. It can be used to better understand data gatered and to translate data or the meaning of data from other databases (mapping).  It takes great afford to make a domain ontology and so the framework ontology can be further developed into and domain ontology. 

\subsection{Less Formal Ontology Approaches}
An other ontology descried in the paper "Advancing ecological research with ontologies" is controlled vocabularies. This can be used to control the natural language by connecting e.g. synonyms describing the same thing. 
\\
\\
Its clear that the development of an Domain- specific ontology has the greatest impact on understanding data and automated scientific tools. There is an great effort to make a domain ontology and therefore a framework ontology would be preferable to semantically describe the data. By using a framework ontology one can search for a person with the given resources for a given project and also to search for similar projects / rapports. The use of ontologies would have a huge impact when making decisions based on several reports from several places made from several persons. The semantic web would gather more of the data needed and most likely result in better results. By shearing the date with other departments, and making the data open to the public, would be  a great asset. In a future scenario the system can make and shedule tasks for the "Oppsynsmenn" acording to the data avaliable and different agent interpretating the data. 

\section{GeoNames Rest Service}\label{s:GeoNames}
The GeoNamse onthology is based on 
Wikipedia For Geographical Data. Nice for maschup with google maps. The problem is that the address look up is not working outside USA. Therefore Google maps reverse geolocation is used to get the address from latitude and longitude. 
Using the GeoNames rest service would make auto complete when searching possible, find nearby wikipedia, places, weather and so on. 


\subsection{Implementation}
For the GeoNames we can use a REST service. The MVC pattern would actually work quite well. The request is the HTTP location of the resource, which gets passed to the controller, which loads the data via the model, and then passes it to the view which returns it in whatever form is needed (JSON, XML, Binary, etc).



\section{Conclusion}

Standards. stable and not stable solutions. w3c. Enhancement (camera, gps, etc) gives possibilities. mobile devices can be used offline and synchronized when online and possibilities to collaborate with co-workers. Security is divided where cloud services are secure in theory  although in practise data is open for e.g. American governments - patriot act. 

%NOTE: Run bibtex build twice and after latex build to have correct output
%below the bibliography is used for the setting up citation
\bibliographystyle{IEEEtran}
%imports data from references.bib file
\bibliography{RefDatabase}

\section{Appendicies}
This section includes all related files to the project and final report.

\subsection{Appendix A}\label{ap:a}
\includepdf[pages=1-3]{ProjDescr.pdf}

\subsection{Appendix B}\label{ap:b}
\begin{lstlisting} 
// use of javascript function to 
// initiate native java activity  as a plugin

sync.prototype.show = function(str, win, fail) 
{	cordova.exec(win, fail, "sync", "show", [str]);	};
 
navigator.sync = new sync();

// function is responsible for sending message to the dropbox
function syncronize(ms){	navigator.sync.show(ms);		} 
\end{lstlisting}

%\include{filename}
\end{document}
